package br.com.sgc.entities.geral;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "ficha_vacinacao", schema = "geral")
public class FichaVacinacao implements Serializable{

	private static final long serialVersionUID = -3809638839080427994L;
	
	@Id
	@SequenceGenerator(sequenceName="geral.seq_ficha_vacinacao", name="SEQ", allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,  generator="SEQ")
	private Long id;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "paciente_id")
	private Paciente paciente = new Paciente();
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "vacina_id")
	private Vacina vacina;
	
	private Integer numeroDose;
	
	@Temporal(TemporalType.DATE)
	private Date dataVacinacao;
	
	@Temporal(TemporalType.DATE)
	private Date dataProximaVacinacao;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Paciente getPaciente() {
		return paciente;
	}

	public void setPaciente(Paciente paciente) {
		this.paciente = paciente;
	}

	public Vacina getVacina() {
		return vacina;
	}

	public void setVacina(Vacina vacina) {
		this.vacina = vacina;
	}

	public Integer getNumeroDose() {
		return numeroDose;
	}

	public void setNumeroDose(Integer numeroDose) {
		this.numeroDose = numeroDose;
	}

	public Date getDataVacinacao() {
		return dataVacinacao;
	}

	public void setDataVacinacao(Date dataVacinacao) {
		this.dataVacinacao = dataVacinacao;
	}

	public Date getDataProximaVacinacao() {
		return dataProximaVacinacao;
	}

	public void setDataProximaVacinacao(Date dataProximaVacinacao) {
		this.dataProximaVacinacao = dataProximaVacinacao;
	}
	
}
